括号表示法:用方括号或其他括号来表达特定含义的记号方式,常见于数学与计算机科学中,例如数组索引(a[i])、集合/区间表示、或某些约定的运算记号(如 Iverson 括号 [\;P\;] 表示命题是否为真)。
/ˈbrækɪt noʊˈteɪʃən/
She wrote the array element using bracket notation: a[0].
她用括号表示法写出数组元素:a[0]。
In many programming languages, bracket notation allows you to access nested data, such as user["profile"]["email"], without calling any functions.
在许多编程语言中,括号表示法可以让你访问嵌套数据,例如 user["profile"]["email"],而无需调用任何函数。
bracket 原指“括号、托架”,来自法语 braguette(与“支撑、夹住”的概念相关),后来在排版与数学中固定表示“括号符号”。notation 来自拉丁语 notatio(“标记、记号法”)。合起来 bracket notation 就是“用括号来表达意义的一套记号/写法”。
a[i] 等方括号表示法讲解数组与指针访问。